<!-- 模态框（Modal） -->
<div class="modal fade" id="add" tabindex="-1" role="dialog"
     aria-labelledby="addModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="addModalLabel">
                    添加节点信息
                </h4>
            </div>
            <div class="modal-body">
                <form role="form" action="__URL__/insert" method="post" id="roleAddForm">
                    <div class="box-body">
                        <div class="form-group">
                            <label>组名：</label>
                            <input type="text" class="required form-control"  name="name">
                        </div>

                        <div class="form-group">
                            <label>上级组：</label>
                            <select name="pid" class="form-control">
                                <option value="0" selected >无上级组</option>
                                <!--<volist name="list" id="list">-->
                                    <!--<option value="{$list.id}" >{$list.name}</option>-->
                                <!--</volist>-->
                            </select>
                        </div>

                        <div class="form-group">
                            <label>组状态：</label>
                            <select   name="status" class="form-control">
                                <option value="1">启用</option>
                                <option value="0">禁用</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label>描 述：</label>
                            <textarea class="required alphanumeric form-control" name="remark"  rows="5" cols="57"></textarea>
                        </div>
                    </div><!-- /.box-body -->

                    <div class="box-footer">
                        <button type="submit" class="btn btn-primary">Submit</button>
                    </div>
                </form>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<script type="text/javascript">
    <!--

    function ajaxGetRoleData() {
        $.ajax('__URL__/ajax_get_add_data',{method:'post',type:'json'})
                .done(function(data){
                    data = eval('('+data+')');
                    var lists = data.list;
                    for (var i = 0;i < lists.length;i++) {
                        $('[name="pid"]').append('<option value="'+lists[i].id+'">'+lists[i].name+'</option>')
                    }

        });
    }
    //-->
</script>